package com.rany.day08.demo02;

import java.util.LinkedList;

public class LinkedLIstTest {
    public static void main(String[] args) {
        LinkedList<String> linkedList = new LinkedList();
        linkedList.add("nihao");
        linkedList.add("lulu");
        linkedList.add("lin");
        linkedList.add("wei");
        System.out.println(linkedList);
        linkedList.remove("nihao");
        if (!linkedList.isEmpty()){
            String s = linkedList.get(2);
            System.out.println(s);
        }
        System.out.println(linkedList);
    }
}
